var e = function(e) {
    return e && e.__esModule ? e : {
        default: e
    };
}(require("../../utils/util")), t = getApp();

Component({
    properties: {
        app: {
            type: String,
            value: "site",
            observer: function(e) {
                this.setData({
                    app: e
                });
            }
        }
    },
    data: {
        app: "",
        currVersion: {},
        isread: 0,
        isshown: !1
    },
    ready: function() {
        var s = this;
        wx.getStorage({
            key: "isReadInit",
            success: function(e) {
                var t = e.data, s = t.version, i = t.isread;
                console.log("当前版本" + s, "是否已读" + i);
            },
            fail: function(i) {
                var a = t.globalData.version;
                e.default.getVersionIsReadStatus(a).then(function(t) {
                    var i = t.isread;
                    i || e.default.loadVserionHistory().then(function(e) {
                        s.setData({
                            currVersion: e.history[0],
                            isshown: !0,
                            isread: i
                        });
                    }), wx.setStorageSync("isReadInit", {
                        version: a,
                        isread: i
                    });
                });
            }
        });
    },
    methods: {
        colseDialog: function() {
            this.setData({
                isshown: !1
            });
        }
    }
});